#include<iostream>
using namespace std;
typedef long long ll;

/*
void solve1() {
	int n;
	cin >> n;
	int flag = 1;
	for (int i = 0; i < n; ++i) {
		
		for (int j = n - i; j > 0; --j) {
			if (flag < 10) {
				cout << 0;
				cout << flag;
			}
			else
				cout << flag;

			flag++;
		}
		cout << endl;
	}

	return;
}
*/

//高精度阶乘
void solve2() {

	int n;
	cin >> n;
	ll ans = 0;
	ll temp = 1;
	for (int i = 1; i <= n; ++i) {
		temp *= i;
		ans += temp;
	}
	cout << ans;
	return;
}


int main() {
	//solve1();
	solve2();
	return 0;
}


/*
int main() {

	int a;
	cin >> a;
	int ans = 1;
	while (a != 1) {
		a /= 2;
		ans++;
	}
	cout << ans;
	return 0;
}
*/


/*
int main() {

	int n, k;
	cin >> n >> k;
	double ans1=0, ans2=0;
	int flag1 = 0, flag2 = 0;
	for (int i = 1; i <= n; ++i) {
		if (i % k == 0) {
			ans1 = ans1 + i;
			flag1++;
		}
			
		else {
			ans2 = ans2 + i;
			flag2++;
		}
			
	}
	double ret1 = ans1 / flag1;
	double ret2 = ans2 / flag2;
	printf("%.1f ", ret1);
	printf("%.1f", ret2);

	return 0;
}
*/